<template>
  <div class="search">
    <van-search
    v-model="searchValue"
    placeholder="搜索商品，发现更多优选"
    shape="round"
    background="rgb(253,222,74)"
    @focus="toSearchPath"
    />
  </div>
</template>
<script>
import Vue from 'vue'
import { Search } from 'vant'
Vue.use(Search)

export default {
  data () {
    return {
      searchValue: ''
    }
  },
  methods: {
    toSearchPath () {
      this.$route.path !== 'search' && this.$router.push('/search')
    }
  }
}
</script>
